{% load i18n %}
{% load highlight %}

<div id="browse">
	<h1>{% trans "Browse into knowledge" %}</h1>
	<div id="curricular-grades">
		<h2>{% trans "Curricular Grades" %}<h2>
		<ul>
		{% for curricular in curricular_grades %}
			<li><a href="{% url curricular_grade curricular.id %}">{{curricular}}</a></li>
		{% endfor %}
		</ul>
	</div>
	<div id="toplists">
		{% if hit_list %}
		<div id="topviews">
			<h2>{% trans "Top Viewed" %}</h2>
			{% include "tophit_list_items.html" with object_list=hit_list %}
			<p><a href="{% url top_viewed %}">{% trans "see the entire list" %}</a></p>
		</div>	
		{% endif %}
			{% if top_qs %}
			<div id="toprated">
				<h2>{% trans "Top Rated" %}</h2>
				{% if top_qs %}
					{% include "topvoted_list_items.html" with object_list=top_qs %}
				{% endif %}
				<p><a href="{% url top_voted %}">{% trans "see the entire list" %}</a></p>
			</div>
			{% endif %}
	</div>
	{% if featured_list %}
	<div id="featuredlist">
		<h2>{% trans "Featured Resource" %}</h2>
		{% include "featured_list.html" with object_list=featured_list %}
	</div>
	{% endif %}
	{% if tags_to_cloud %}
	<div id="tagcloud">
	{% regroup tags_to_cloud|dictsortreversed:"count" by count as tag_list %}
		<h2>{% trans "Tag Cloud" %}</h2>
		<p>
		{% for count in tag_list %}
			{%for tag in count.list %}
				<font size="{{ tag.font_size }}">
					{% ifequal tag.id actual_tag.id %}<b>{% endifequal %}
					<a href="{% url tag_details tag.id %}?q={{q}}">{{tag.name}} {# ({{count.grouper}})#}</a>
					{% ifequal tag.id actual_tag.id %}</b>{% endifequal %}
				</font>
			{% endfor %}
		{%endfor%}
		</p>
	</div>
	{% endif %}	
</div>
